package edu.gatech.cs2340.teamrocket.view.networking;

/**
 * Interface for GUI that asks users for info needed to setup or join a server.
 *
 * @author Joe Tacheron
 */
public interface NetworkSetupGUIInterface {

    // when user clicks "Join Server" or "Create Server" buttons,
    // simply call joinServerClicked() or createServerClicked() in NetworkSetupControl
    // (which must be taken as a param in gui constructor)
    // Look at control.guicontrol.networking.NetworkSetupControlInterface if you need to

    /**
     * Create and display this GUI
     */
    void createAndShowGUI();

    /**
     *
     * @return the text inside the IP Address JTextField
     */
    String getIPAddress();

    /**
     *
     * @return the text inside the Username JTextField
     */
    String getClientUsername();

    /**
     *
     * @return the text inside the Password JTextField for joining a server
     */
    String getClientPassword();

    /**
     *
     * @return the text inside the Username JTextField for creating a server
     */
    String getServerUsername();

    /**
     *
     * @return the text inside the Password JTextField for creating a server
     */
    String getServerPassword();

    /**
     * Show an error message for the IP address inputted
     */
    void errIPAddress(String errMsg);

    /**
     * Show an error message for the client username inputted
     */
    void errClientUsername(String errMsg);

    /**
     * Show an error message for the server username inputted
     */
    void errServerUsername(String errMsg);

    /**
     * Show an error message for the user password inputted
     */
    void errClientPassword(String errMsg);

    /**
     * Show an error message for the server password inputted
     */
    void errServerPassword(String errMsg);

    /**
     * Close this GUI
     */
    void close();
}
